package zuoye01;

public class Shuzu {
    public static void main(String[] args) {
        //创建一个包含五个字符串的数组
        String[] Shuzu={"Hello","World","Welcome","to","java"};

        //使用for循环循环遍历数组并打印每个元素
        for (int i = 0;i<Shuzu.length;i++){
            System.out.println(Shuzu[i]);
        }
        //或者使用增强型for循环(foreach)来打印数组元素
        System.out.println("Using enhanxed for loop");
        for (String str :Shuzu){
            System.out.println(str);
        }
    }
}
